package com.kim.client.enums;

/**
 * messageType(消息类型)：1-person to person(1对1聊天) 2-group(群聊) 3-heartbeat(心跳消息)
 */
public enum MessageTypeServerEnum {
    PERSON("1","person","personMessageStrategy"),
    GROUP("2","group","groupMessageStrategy"),
    HEARTBEAT("3","heartbeat","heartbeatMessageStrategy"),


    ;


    private String id;

    private String type;

    private String service;

    public static MessageTypeServerEnum getServiceById(String id){
        for (MessageTypeServerEnum value : MessageTypeServerEnum.values()) {
            if (value.id.equals(id)){
                return value;
            }
        }
        return null;
    }

    MessageTypeServerEnum(String id, String type, String service) {
        this.id = id;
        this.type = type;
        this.service = service;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getService() {
        return service;
    }

    public void setService(String service) {
        this.service = service;
    }
}
